package com.jt.controller;

import com.jt.pojo.User;
import com.jt.proxy.JDKProxyFactory;
import com.jt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {

    @Autowired
    @Qualifier("target")
    private UserService userService;

    public void deleteUser(User user){
        UserService proxy = (UserService) JDKProxyFactory.getProxy(userService);
        proxy.deleteUser(user);
    }
}
